1. Field of the Invention
The present invention relates to a microprocessor that performs IIR filter operations.
2. Description of Related Art
Microprocessors, such as digital signal processors (DSP), that are designed specifically for digital signal processing are commonly used for infinite impulse response (IIR) filter operations.
Various expression forms of IIR filters have been proposed. Typical forms are direct form I and direct form II. FIG. 15 shows a second-order IIR filter 7 expressed by the direct form I. The second-order IIR filter 7 includes a feed-forward section 72 and a feedback section 71 connected in series in this order. In FIG. 15, reference numerals 711, 712, 721, and 722 denote delay circuits (memory elements) that delay input data by one sample. Reference numerals 713, 714, 723, and 724 denote multipliers. Reference symbols a1, a2, b1 and b2 denote filter coefficients applied to the multipliers 713, 714, 723, and 724. Reference numerals 715 and 725 denote adders that perform arithmetic addition of input data. The term “sample” means digital data that can be obtained in one sampling in a digital data series resulting from digitization by sampling an analog signal at predetermined time intervals.
A filter operation by the IIR filter 7 in FIG. 15 can be expressed by the following equation (1):
                              Y          ⁡                      [            n            ]                          =                              X            ⁡                          [              n              ]                                +                                    ∑                              k                =                1                            2                        ⁢                                          b                k                            ·                              X                ⁡                                  [                                      n                    -                    k                                    ]                                                              +                                    ∑                              k                =                1                            2                        ⁢                                          a                k                            ·                              Y                ⁡                                  [                                      n                    -                    k                                    ]                                                                                        (        1        )            where X[n] is the n-th sample data to be subjected to filter operation and Y[n] is data already subjected to filter operation.
FIG. 16 shows a second-order IIR filter 8 expressed by the direct form II. The direct-form-II second-order IIR filter 8 has a configuration in which the feedback section and feed-forward section of the direct I are flipped. In FIG. 16, reference numerals 811 and 812 denote delay circuits (memory elements) that delay input data by one sample. Reference numerals 813 to 816 denote multipliers. Reference symbols a1, a2, b1 and b2 denote filter coefficients applied to the multipliers 813 to 816. Reference numerals 817 and 818 denote adders that perform arithmetic addition of input data.
A filter operation by the IIR filter 8 in FIG. 16 can be expressed by the following equations (2) and (3):
                              P          ⁡                      [            n            ]                          =                              X            ⁡                          [              n              ]                                +                                    ∑                              k                =                1                            2                        ⁢                                          a                k                            ·                              P                ⁡                                  [                                      n                    -                    k                                    ]                                                                                        (        2        )                                          Y          ⁡                      [            n            ]                          =                              P            ⁡                          [              n              ]                                +                                    ∑                              k                =                1                            2                        ⁢                                          b                k                            ·                              P                ⁡                                  [                                      n                    -                    k                                    ]                                                                                        (        3        )            where X[n] is the n-th sample data to be subjected to filter operation, Y[n] is data already subjected to filter operation, and P[n] is intermediate data passed to a new filter operation on data X[n+1] to be subjected to filter operation and subsequent data.
The second-order IIR filters 7 and 8 shown in FIGS. 15 and 16 are called biquad filters. To implement a high-order IIR filter, typically biquad filters are connected in series. For example, an eighth-order IIR filter 9 can be implemented by connecting four direct-form-II biquad filters in series as shown in FIG. 17. In FIG. 17, reference numerals 811, 812, 821, 822, 831, 832, 841, and 842 denote delay circuits (memory elements) that delay input data by one sample. Reference numerals 813 to 816, 823 to 826m 833 to 836, and 843 to 846 denote multipliers.
Reference symbols a11, a12, b11, and b12 denote filter coefficients applied to the multipliers 813 to 816. Similarly, reference symbols a21, a22, b21, and b22 denote filter coefficients applied to the multipliers 823 to 826, reference symbols a31, a32, b31, and b32 denote filter coefficients applied to the multipliers 833 to 836 and reference symbols a41, a42, b41, and b42 denote filter coefficients applied to the multipliers 843 to 846.
Reference numerals 817, 818, 827, 828, 837, 838, 847, and 848 denote adders that perform arithmetic additions of input data and A[n] represents output data from the first-stage biquad filter 91. Similarly, B[n] represents output data from the second-stage biquad filter 92 and C[n] represents output data from the third-stage biquad filter 93.
Generally, a program that causes a DSP to execute IIR filter operations (hereinafter referred to as an IIR filter operation program) is represented by loop processing. For example, loop processing of an IIR filter operation program is written as loop processing in which one loop unit is a set of instructions for executing an IIR filter processing for one sample. As another example, loop processing of an IIR filter operation program is written as loop processing in which one loop unit is a set of instructions for executing basic block processing, where the basic block is a unit of series connection of filters such as biquad filters. The basic block is not limited to a biquad filter (second-order filter). For example, a basic block may be a third-or-higher-order IIR filter.
For example, a sample program for causing a microprocessor to execute arithmetic processing of a fourth-order IIR filter consisting of two direct-form-II biquad filters connected in series is shown in pp. 9-11 of Chapter 4 “Signal Processing” in Non-Patent Document 1.    [Non-Patent Document 1] TMS320C54x DSP Reference Set Volume 4: Applications Guide, [online], October 1996, pp. 4-9-4-11, Texas Instruments Inc., [searched on Jul. 10, 2007], Internet <URL: http://focus.ti.com/lit/ug/sprul73/sprul73.pdf>
An IIR filter operation is repeatedly executed on successively input samples in many cases, such as filtering of audio and video signals obtained by sensors such as microphones and cameras, or communication signals. An IIR filter is a recursive filter containing so-called feedbacks. Therefore, in order to repeatedly execute an IIR filter operation on samples input one after another, data generated by the past filter operation need to be efficiently provided to the next operation as input data.